package com.ruoyi.system.service;

import java.util.List;
import java.util.Map;

import com.ruoyi.bill.domain.ZnDepotHead;
import com.ruoyi.bill.mapper.ZnDepotHeadMapper;
import com.ruoyi.material.service.IZnMaterialInitialStockService;
import com.ruoyi.system.domain.BossReportVo;
import com.ruoyi.system.domain.ZnProfitDetail;
import com.ruoyi.system.mapper.ZnProfitDetailMapper;
import com.ruoyi.system.mapper.ZnProfitHistoryMapper;

/**
 * 统计利润明细Service接口
 * 
 * @author ruoyi
 * @date 2022-10-10
 */
public interface IZnProfitDetailService 
{
    /**
     * 查询统计利润明细
     * 
     * @param id 统计利润明细主键
     * @return 统计利润明细
     */
    public ZnProfitDetail selectZnProfitDetailById(Long id);

    /**
     * 查询统计利润明细列表
     * 
     * @param znProfitDetail 统计利润明细
     * @return 统计利润明细集合
     */
    public List<ZnProfitDetail> selectZnProfitDetailList(ZnProfitDetail znProfitDetail);
     /**
      * 查询统计利润明细记录数
      *
      * @param znProfitDetail 统计利润明细
      * @return 统计利润明细记录数
     */
    public Integer selectZnProfitDetailCount(ZnProfitDetail znProfitDetail);

    /**
     * 新增统计利润明细
     * 
     * @param znProfitDetail 统计利润明细
     * @return 结果
     */
    public int insertZnProfitDetail(ZnProfitDetail znProfitDetail);

    /**
     * 修改统计利润明细
     * 
     * @param znProfitDetail 统计利润明细
     * @return 结果
     */
    public int updateZnProfitDetail(ZnProfitDetail znProfitDetail);

    /**
     * 批量删除统计利润明细
     * 
     * @param ids 需要删除的统计利润明细主键集合
     * @return 结果
     */
    public int deleteZnProfitDetailByIds(Long[] ids);

    /**
     * 删除统计利润明细信息
     * 
     * @param id 统计利润明细主键
     * @return 结果
     */
    public int deleteZnProfitDetailById(Long id);

    List<BossReportVo> selectBossReportList(ZnProfitDetail znProfitDetail);

    void test(ZnDepotHeadMapper znDepotHeadMapper, ZnProfitDetailMapper znProfitDetailMapper, ZnProfitHistoryMapper znProfitHistoryMapper, IZnMaterialInitialStockService znMaterialInitialStockService, ZnDepotHead queryParam, Long profitId, Long tenanId);

    Map<String, Object> findLastOperTimeAndInId(ZnProfitDetail znProfitDetail);

    void computeProfit(Long tenanId,Long profitId);
}
